function myNew(fn, ...args) {
    let newObj = Object.create(fn.prototype)
    let result = fn.call(newObj, ...args)
    result instanceof Object ? result : newObj
}

function myInstacneOf(obj, Obj) {
    let objProto = obj.__proto__
    let ObjProto = Obj.prototype
    while (true) {
        if (objProto === null) {
            return false
        }
        if (objProto === ObjProto) {
            return true
        }
        objProto = objProto.__proto__
    }
}
function fn(){}
let a = new fn()
console.log(a instanceof Array)